﻿using Handday.Erp.Transfer.Enum;
using HandDay.Framework.Common.Services;
using HandDay.Framework.Core.DependencyInjection;
using System.Threading.Tasks;

namespace Handday.Erp.Transfer.Services
{
    /// <summary>
    /// 源数据存储服务
    /// </summary>
    /// <typeparam name="TData">数据类型</typeparam>
    public interface ISourceDataStorageService<TData> : ITransientDependency
    {
        /// <summary>
        /// 功能类型
        /// </summary>
        ErpFeatureTypeEnum FeatureType { get; }

        /// <summary>
        /// 存储
        /// </summary>
        /// <param name="data">数据</param>
        Task<ServiceResult> StoreAsync(TData data);
    }

    /// <summary>
    /// 源数据存储服务
    /// </summary>
    public interface ISourceDataStorageService : ITransientDependency
    {
        /// <summary>
        /// 功能类型
        /// </summary>
        ErpFeatureTypeEnum FeatureType { get; }

        /// <summary>
        /// 存储
        /// </summary>
        /// <param name="jsondata">数据</param>
        Task<ServiceResult> StoreAsync(string jsondata);
    }
}
